<?php
namespace Admin\Controller;
use Think\Controller;
class BaseController extends Controller {
    public function login_verify(){
        if (!isset($_COOKIE['username'])) {
            //用户登录后才能进入后台
        	$this->redirect('Login/index');
        } else {
        	//设置用户信息
        	$userinfo=$_COOKIE['username'];
        	$this->assign('userinfo',$userinfo);
        	// 页面输出当前控制器用于改变class=‘current’
        	$this->assign('current_controller',CONTROLLER_NAME);
        }     
    }
}